var AUTO;
(function (AUTO) {
    var Dialog = (function () {
        function Dialog(element, options) {
            this._$el = $(element);
            if (_.isObject(options)) {
                this._opt = $.extend({
                    type: 1,
                    content: this._$el,
                    maxmin: true,
                    area: options.width
                }, options);
                var index = layer.open(this._opt);
                this._$el.data("dialogindex", index);
            }
            else if (_.isString(options)) {
                if (options == "close") {
                    layer.close(this._$el.data("dialogindex"));
                }
            }
        }
        return Dialog;
    }());
    AUTO.Dialog = Dialog;
})(AUTO || (AUTO = {}));
